package leetcode.code1347;

import leetcode.IDebug;


//执行用时：6 ms, 在所有 Java 提交中击败了98.39%的用户
//
//内存消耗：41.5 MB, 在所有 Java 提交中击败了8.07%的用户
//
//通过测试用例：63 / 63
public class Solution implements IDebug {

	public int minSteps(String s, String t) {
		char[] cs = s.toCharArray();
		char[] ct = t.toCharArray();
		int[] dic = new int[26];
		for (char c : cs) {
			dic[c - 'a']++;
		}
		for (char c : ct) {
			int index = c - 'a';
			if (dic[index] > 0) {
				dic[index]--;
			}
		}
		int ans = 0;
		for (int num : dic) {
			ans += num;
		}
		return ans;
	}

	@Override
	public void debug1() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug2() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
